package services

import (
	"system_go/dao"
	"system_go/models"
)

func GetAllCommodities(commoditiesParam map[string]interface{}) (error, []models.Commodity, int64) {
	err, commoditiesData, total := dao.GetAllCommodities(commoditiesParam)
	return err, commoditiesData, total
}

func AddCommodities(commodities models.Commodity) error {
	err := dao.AddCommodities(commodities)
	return err
}

func DelCommodities(id string) error {
	err := dao.DelCommodities(id)
	return err
}

func UpdateCommodities(commodities models.Commodity) error {
	err := dao.UpdateCommodities(commodities)
	return err
}
